package com.itzyf.pokemondata.bean;

import com.avos.avoscloud.AVObject;

import org.litepal.crud.LitePalSupport;

import java.util.Date;

/**
 * @author 依风听雨
 * @version 创建时间：2019/06/03 08:54
 */
public class DbSkillDo extends LitePalSupport {
    private Date updatedAt;
    private String objectId;
    private Date createdAt;
    private long id;

    private String attribute;
    private int pp;
    private String detailed;
    private int shooting;
    private int power;
    private String cname;
    private String ctype;
    private String tooltip;

    public DbSkillDo() {
    }

    public DbSkillDo(SkillJsonDo jsonDo) {
        objectId = jsonDo.getObjectId();
        updatedAt = jsonDo.getUpdatedAt();
        createdAt = jsonDo.getCreatedAt();
        attribute = jsonDo.getAttribute();
        pp = jsonDo.getPp();
        detailed = jsonDo.getDetailed();
        shooting = jsonDo.getShooting();
        power = jsonDo.getPower();
        cname = jsonDo.getCname();
        ctype = jsonDo.getCtype();
        tooltip = jsonDo.getTooltip();
    }

    public DbSkillDo(AVObject jsonDo) {
        objectId = jsonDo.getObjectId();
        updatedAt = jsonDo.getUpdatedAt();
        createdAt = jsonDo.getCreatedAt();
        attribute = jsonDo.getString("attribute");
        pp = jsonDo.getInt("pp");
        detailed = jsonDo.getString("detailed");
        shooting = jsonDo.getInt("shooting");
        power = jsonDo.getInt("power");
        cname = jsonDo.getString("cname");
        ctype = jsonDo.getString("ctype");
        tooltip = jsonDo.getString("tooltip");
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getObjectId() {
        return objectId == null ? "" : objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getAttribute() {
        return attribute == null ? "" : attribute;
    }

    public void setAttribute(String attribute) {
        this.attribute = attribute;
    }

    public int getPp() {
        return pp;
    }

    public void setPp(int pp) {
        this.pp = pp;
    }

    public String getDetailed() {
        return detailed == null ? "" : detailed;
    }

    public void setDetailed(String detailed) {
        this.detailed = detailed;
    }

    public int getShooting() {
        return shooting;
    }

    public void setShooting(int shooting) {
        this.shooting = shooting;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public String getCname() {
        return cname == null ? "" : cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getCtype() {
        return ctype == null ? "" : ctype;
    }

    public void setCtype(String ctype) {
        this.ctype = ctype;
    }

    public String getTooltip() {
        return tooltip == null ? "" : tooltip;
    }

    public void setTooltip(String tooltip) {
        this.tooltip = tooltip;
    }
}
